package com.jbm.onehome.remote;

import com.jbm.core.client.MainCallback;
import com.jbm.core.common.MainServer;
import com.jbm.core.iface.IAcross;
import com.jbm.onehome.iface.CallGroupEntity;

/**
 * Created by root on 17-7-6.
 */
public class RCallGroupEntity extends CallGroupEntity
{
	public RCallGroupEntity(){}
	public RCallGroupEntity(IAcross ia)
	{
		super(ia);
	}

	public IAcross ConfirmStart()
	{
		MainCallback callback = MainServer.getG_server().getM_maincallback();

		if ( callback != null )
		{
			CallGroupEntity cg = (CallGroupEntity)m_input;

			callback.GPConfirmStart(cg.getCgId());
		}

		return null;
	}

	public IAcross SelectCertAddress()
	{
		MainCallback callback = MainServer.getG_server().getM_maincallback();

		if ( callback != null )
		{
			CallGroupEntity cg = (CallGroupEntity)m_input;

			callback.GPSelectCertAddress(cg.getCgId(),cg.getCaddrList());
		}

		return null;
	}

	public IAcross SelectCatalog()
	{
		MainCallback callback = MainServer.getG_server().getM_maincallback();

		if ( callback != null )
		{
			CallGroupEntity cg = (CallGroupEntity)m_input;

			callback.GPSelectCatalog(cg.getCgId(),cg.getGoodsList());
		}

		return null;
	}

	public IAcross SelectTeam()
	{
		MainCallback callback = MainServer.getG_server().getM_maincallback();

		if ( callback != null )
		{
			CallGroupEntity cg = (CallGroupEntity)m_input;

//			callback.GPSelectTeam(cg.getCgId(),cg.m_team);
		}

		return null;
	}

	public IAcross ServiceMemo()
	{
		MainCallback callback = MainServer.getG_server().getM_maincallback();

		if ( callback != null )
		{
			CallGroupEntity cg = (CallGroupEntity)m_input;

//			callback.GPSelectTeam(cg.getCgId(),cg.m_team);
		}

		return null;
	}

	public IAcross OrderConfirm()
	{
		MainCallback callback = MainServer.getG_server().getM_maincallback();

		if ( callback != null )
		{
			CallGroupEntity cg = (CallGroupEntity)m_input;

//			callback.GPSelectTeam(cg.getCgId(),cg.m_team);
		}

		return null;
	}

	public IAcross addToUnit()
	{
		MainCallback callback = MainServer.getG_server().getM_maincallback();

		if ( callback != null )
		{
			CallGroupEntity cg = (CallGroupEntity)m_input;

			callback.addToUnit(cg);
		}

		return new IAcross(200,"addToUnitOK");
	}
}
